package com.jiangyao.common.exception;

import lombok.Getter;
import lombok.Setter;

/**
 * 服务端异常
 */
public class ServerException extends RuntimeException {

	private static final long serialVersionUID = 123123123122L;
	@Setter
	@Getter
	private int code;

	public ServerException(String message) {
		super(message);
		this.code = 500;
	}

	public ServerException(int code, String message) {
		super(message);
		this.code = code;
	}

	public ServerException(int code, String message, Throwable cause) {
		super(message, cause);
		this.code = code;
	}
}
